package com.itboye.services.ucenter.impl;


import com.itboye.mybatis.mapper.IAuthGroupMapper;
import com.itboye.mybatis.mapper.IBaseMapper;
import com.itboye.mybatis.model.AuthGroupModel;
import com.itboye.mybatis.viewmodel.UserAuthGroupAccessViewModel;
import com.itboye.services.ucenter.BaseService;
import com.itboye.services.ucenter.interfaces.IAuthGroupService;
import com.itboye.system.helper.ByConsoleHelper;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;

/**
 * AuthGroupService.java
 * Created on  2016/7/22 16:38
 * 版本       修改时间          作者      修改内容
 * V1.0.1    2016/7/22      hebidu    初始版本
 * <p>
 * Copyright (c) 2013 杭州博也网络科技有限公司 版权所有
 * HANGZHOU BOYE TECHNOLOGY CO.,LTD. All Rights Reserved.
 */
@Service("authGroupService")
public class AuthGroupService extends BaseService<AuthGroupModel> implements IAuthGroupService {

    private static final Logger logger = LogManager.getLogger(AuthGroupService.class.toString());

    public IBaseMapper<AuthGroupModel> getMapper() {
        return authGroupMapper;
    }

    public List<UserAuthGroupAccessViewModel> queryByUid(int uid) {
        return authGroupMapper.queryByUid(uid);
    }

    public int batchInsertUserAccess(List<UserAuthGroupAccessViewModel> list) {
        return authGroupMapper.batchInsertUserAccess(list);
    }

    @Resource
    private IAuthGroupMapper authGroupMapper;

    public AuthGroupService() {
        super();
        ByConsoleHelper.debug("authGroupService init",logger);
    }


}
